<style>
.commend_object a{color:#6798cc;}
</style>
<form class="layui-form layui-font14"  name="">
<div class="layui-form-item" style='padding:15px 0;'>
    <label class="layui-form-label"><b>推荐{:typename($good)}</b></label>
    <div class="layui-input-inline commend_object" style='padding: 6px 0;width:auto;'><font class="gray">请选择推荐的{:typename($good)}</font></div>
</div>
<div class="layui-form-item" style='padding-bottom:15px;'>
    <label class="layui-form-label"></label>
    <div class="layui-input-block"><input type="submit" class="layui-btn layui-btn-normal layui-btn-small" lay-submit="" lay-filter="commend"  value="确认提交" /> <input type="button" class="layui-btn layui-btn-primary layui-btn-small preview"  value="选择{:typename($good)}" /></div>
</div>
<input type="hidden" value="1" name="layer" />
<input type="hidden" value="{$action}" name="data" />
<input type="hidden" value="{$data}" name="gid" />
<input type="hidden" value="commend" name="object" />
<input type="hidden" value="{$good}" name="good" />
<input type="hidden" value="commend" name="action" />
</form>

<script language="javascript">
 layui.use('form', function(){
  var form = layui.form();
	 form.verify({
		title: function(value){
			  if(value.length<2 || value.length>7) return "【连接名称】字数需为2~6位";
		},
		link: function(value){
			  if(value.substring(0,7).indexOf("http://")==-1|| value.substring(0,24).indexOf(".huzhan.com")==-1) return "【连接地址】需为【{:sysconf('site_name')}】站内链接，且需以http://开头";
		}
	});

	form.on('submit(commend)', function(data) {
		Aform('shop_admin',data.field);
		return false;
	});
 });
</script>